Ext.define('AmpleHarvest.objects.Statistics.view.pages.cSourceList',
		{
			extend			: 'AmpleHarvest.objects.Statistics.absPanel',
			uses			:
			[
					//'AmpleHarvest.Data.Store.statistics.cMetrics',
					'Ext.grid.Panel'
			],
			requires		:
			[
					'AmpleHarvest.DATA.Store.statistics.cSourceCount',
					'Ext.container.AbstractContainer', 'Ext.form.field.Date',
					'Ext.toolbar.Paging'
			],
			title			: 'Source List',
			layout			:
			{
				type	: 'vbox',
				align	: 'stretch'
			},
			frame			: true,
			initComponent	: function()
			{
				this.setStore(Ext.create(
						'AmpleHarvest.DATA.Store.statistics.cSourceCount',
						{
							pageSize	: 50
						}
				));
				this.m_obj_Pageing = Ext.create('Ext.toolbar.Paging',
						{
							xtype		: 'pagingtoolbar',
							store		: this.getStore(),
							dock		: 'bottom',
							displayInfo	: true
						});

				this.m_obj_Grid = Ext.create('Ext.grid.Panel',
						{
							store		: this.getStore(),
							flex		: 1,
							columns		:
							[
									{
										header		: 'Source',
										dataIndex	: 'source',
										flex		: 1
									},
									{
										header		: 'Day',
										dataIndex	: 'daily',
										flex		: 1
									},
									{
										header		: 'Week',
										dataIndex	: 'weekly',
										flex		: 1
									},
									{
										header		: 'Month',
										dataIndex	: 'monthly',
										flex		: 1
									},
									{
										header		: 'Year',
										dataIndex	: 'yearly',
										flex		: 1
									},
									{
										header		: 'Total',
										dataIndex	: 'total',
										flex		: 1
									}
							],
							dockedItems	:
							[
								this.m_obj_Pageing
							]
						});

				this.callParent();
				this.getStore().on("beforeload", this.showMask, this);
				this.getStore().on("load", this.hideMask, this);

				this.on("render", this.updateData, this);

				this.add(this.m_obj_Grid);
			}

		});